from question.chat_chain.chat_by_kb import ChatByKB
from config.config_env import SCORE_THRESHOLD, TOP_K, TEMPERATURE


class ChatBot:
    def __init__(self):
        self.QA = ChatByKB()

    def chat_main(self, sent, is_chat_kg=False):
        return self.QA.get_knowledge_based_answer(query=sent,
                                                  is_chat_kg=is_chat_kg,
                                                  score_threshold=SCORE_THRESHOLD,
                                                  top_k=TOP_K,
                                                  temperature=TEMPERATURE)
